from fastapi.responses import JSONResponse


class APIResponse:

    def __init__(self, code=200, message="ok", data=None):
        self.__code = code
        self.__message = message
        self.__data = data
        self.response = JSONResponse(
            content={
                "code": self.__code,
                "message": self.__message,
                "data": self.__data,
            },
            status_code=200,
        )
